package com.play.ballen.me.entity;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

public class UserInfo implements Parcelable {

    public String id;
    public String token;
    public String email;
    public String parent_id;
    public String parent_tree;
    public String invite_code;
    public String money;
    public String avatar;
    public int state;//用户状态 (0：禁用 1：启用 2：锁定)
    public String logins;
    public String money2;
    public String HXToken;
    public String JiyuToken;
    public String phone;


    protected UserInfo(Parcel in) {
        id = in.readString();
        token = in.readString();
        email = in.readString();
        parent_id = in.readString();
        parent_tree = in.readString();
        invite_code = in.readString();
        money = in.readString();
        avatar = in.readString();
        state = in.readInt();
        logins = in.readString();
        money2 = in.readString();
        HXToken = in.readString();
        JiyuToken = in.readString();
        phone = in.readString();
    }

    public static final Creator<UserInfo> CREATOR = new Creator<UserInfo>() {
        @Override
        public UserInfo createFromParcel(Parcel in) {
            return new UserInfo(in);
        }

        @Override
        public UserInfo[] newArray(int size) {
            return new UserInfo[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(token);
        dest.writeString(email);
        dest.writeString(parent_id);
        dest.writeString(parent_tree);
        dest.writeString(invite_code);
        dest.writeString(money);
        dest.writeString(avatar);
        dest.writeInt(state);
        dest.writeString(logins);
        dest.writeString(money2);
        dest.writeString(HXToken);
        dest.writeString(JiyuToken);
        dest.writeString(phone);
    }
}